<?php

namespace JLPay\Models\Clearing;

/**
 * 通知数据传输对象
 */
class NotifyDto
{
    protected ?string $merchNo = null;
    protected ?string $settleType = null;
    protected ?string $amount = null;
    protected ?string $feeAmount = null;
    protected ?string $outSettleId = null;
    protected ?string $settleId = null;
    protected ?string $postscript = null;
    protected ?string $paymentTime = null;
    protected ?string $orgNo = null;
    protected ?string $resultState = null;

    /**
     * 构造函数
     *
     * @param array|null $responseDict
     */
    public function __construct(?array $responseDict = null)
    {
        if ($responseDict) {
            $this->merchNo = $responseDict['merch_no'] ?? null;
            $this->settleType = $responseDict['settle_type'] ?? null;
            $this->amount = $responseDict['amount'] ?? null;
            $this->feeAmount = $responseDict['fee_amount'] ?? null;
            $this->outSettleId = $responseDict['out_settle_id'] ?? null;
            $this->settleId = $responseDict['settle_id'] ?? null;
            $this->postscript = $responseDict['postscript'] ?? null;
            $this->paymentTime = $responseDict['payment_time'] ?? null;
            $this->orgNo = $responseDict['org_no'] ?? null;
            $this->resultState = $responseDict['result_state'] ?? null;
        }
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 获取结算类型
     *
     * @return string|null
     */
    public function getSettleType(): ?string
    {
        return $this->settleType;
    }

    /**
     * 获取金额
     *
     * @return string|null
     */
    public function getAmount(): ?string
    {
        return $this->amount;
    }

    /**
     * 获取手续费金额
     *
     * @return string|null
     */
    public function getFeeAmount(): ?string
    {
        return $this->feeAmount;
    }

    /**
     * 获取外部结算ID
     *
     * @return string|null
     */
    public function getOutSettleId(): ?string
    {
        return $this->outSettleId;
    }

    /**
     * 获取结算ID
     *
     * @return string|null
     */
    public function getSettleId(): ?string
    {
        return $this->settleId;
    }

    /**
     * 获取附言
     *
     * @return string|null
     */
    public function getPostscript(): ?string
    {
        return $this->postscript;
    }

    /**
     * 获取支付时间
     *
     * @return string|null
     */
    public function getPaymentTime(): ?string
    {
        return $this->paymentTime;
    }

    /**
     * 获取机构号
     *
     * @return string|null
     */
    public function getOrgNo(): ?string
    {
        return $this->orgNo;
    }

    /**
     * 获取结果状态
     *
     * @return string|null
     */
    public function getResultState(): ?string
    {
        return $this->resultState;
    }
} 